package com.photoslider.client;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class LoadingMask extends VerticalPanel{

	Image loadingImage = new Image("images/loading.gif");
	
	public LoadingMask(String message) {
		HTML msgHtml = new HTML("<span class=\"loadingmask\"> " + message +"</span> ");
		
		this.add(loadingImage);
		this.add(msgHtml);
	}
	
	public void show(Panel parent){
		parent.add(this);
	}
	
	public void hide(){
		this.removeFromParent();
	}
}
